package com.mjduan.myBank.myPayment.service.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mjduan.myBank.myPayment.dao.IMyPayDao;
import com.mjduan.myBank.myPayment.service.IMyPayService;
import com.mjduan.myBank.util.entity.MyPay;
import com.mjduan.myBank.util.entity.User;


@Service("MyPayServiceImpl")
@Transactional(rollbackFor=Exception.class)
public class MyPayServiceImpl implements IMyPayService{
	
	@Autowired
	@Qualifier("MyPayDaoImpl")
	private IMyPayDao iMyPayDao;

	public boolean addMyPay(MyPay myPay) {
		// TODO Auto-generated method stub
		return this.iMyPayDao.addPay(myPay);
	}

	public String getSumOfMoney() {
		// TODO Auto-generated method stub
		return this.iMyPayDao.getSumOfMoney();
	}

	public boolean addPayFromExcel(List<Object[]> list, User user) {
		// TODO Auto-generated method stub
		
		return this.iMyPayDao.addPayFromExcel(list, user);
	}

	public long getCount() {
		// TODO Auto-generated method stub
		return this.iMyPayDao.getCount();
	}

	public List<MyPay> getMyPayWithLimit(int offset, int rows) {
		// TODO Auto-generated method stub
		return this.iMyPayDao.getMyPayWithLimit(offset, rows);
	}

	public List<MyPay> getAllMyPayWithoutRemark(User user) {
		// TODO Auto-generated method stub
		return this.iMyPayDao.getAllMyPayWithoutRemark(user);
	}
	
	
	
}
